﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.ZXDDF
{
    class Class1
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                da.Value = ppa.TotalFee;
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Age<=65 && ppa.SchemePeriodActing.InsurantStates.Contains("全残"))
            {
                da.Value = ppa.TotalFee;
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && ppa.Age<88)
            {
                da.Value = ppa.Amount * 0.05;
            }
            else if (ppa.Period > 0 && ppa.Age == 88)
            {
                da.Value = ppa.Amount * 0.1;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.Age == 88)
            {
                da.Value = ppa.TotalFee;
                ppa.IsCurrentFinish = true;
            }
        }
    }
}
